﻿using Sabloane_de_proiectare.Observable;
using Sabloane_de_proiectare.Singleton;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace Sabloane_de_proiectare
{
    class GameTableViewModel
    {
        public GridElements elements { get; set; }
        public ObservableTemplate observer { get; set; }
        public GameTableViewModel() {
            // initialize elements
            elements = new GridElements();
            observer = new ObservableTemplate();
            observer.target.targetElement = BinaryMatrix.Instance();
            elements.setObserver(observer);
            
        }
        public Container getElementAt(int Row, int Column)
        {
            return elements.getElementAt(Row, Column);
        }
        public void loadPreviousState()
        {
            elements = elements.memento.loadState();
        }
    }
}
